﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace DX.Learning.SimpleUserControlInsertion
{
    public partial class XtraUserControl1 : DevExpress.XtraEditors.XtraUserControl
    {
        public XtraUserControl1()
        {
            InitializeComponent();

            tableAdapterManager.TeacherTableAdapter.Fill(schoolSystemDbDataSet.Teacher);

            //teacherTableAdapter.Fill(schoolSystemDbDataSet.Teacher);
            
        }

        private void teacherBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.teacherBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.schoolSystemDbDataSet);

        }
    }
}
